/***************************************************************************
 * File name: EPubDefinitions.h
 * Original author: caizhifei2003@163.com
 * Date: 2013.02.26
 ***************************************************************************/
#ifndef _EPUB_DEFINITIONS_H_
#define _EPUB_DEFINITIONS_H_

// Define basic file pathes(BFP:Basic File Path).
#define EPUB_BFP_MIME_TYPE							"mimetype"
#define EPUB_BFP_META_INF_CONTAINER					"META-INF/container.xml"
#define EPUB_BFP_META_INF_ENCRYPTION				"META-INF/encryption.xml"
#define EPUB_BFP_META_INF_MANIFEST					"META-INF/manifest.xml"
#define EPUB_BFP_META_INF_METADATA					"META-INF/metadata.xml"
#define EPUB_BFP_META_INF_RIGHTS					"META-INF/rights.xml"
#define EPUB_BFP_META_INF_SIGNATURES				"META-INF/signatures.xml"

// Define core media types(MT:Media Type).
#define EPUB_MT_GIF									"image/gif"						// Image Types
#define EPUB_MT_JPEG								"image/jpeg"
#define EPUB_MT_PNG									"image/png"
#define EPUB_MT_SVG									"image/svg+xml"
#define EPUB_MT_XHTML								"application/xhtml+xml"			// Application Types
#define EPUB_MT_OPF2								"application/x-dtbncx+xml"
#define EPUB_MT_OPEN_TYPE							"application/vnd.ms-opentype"
#define EPUB_MT_WOFF								"application/font-woff"
#define EPUB_MT_MEDIA_OVERLAYS						"application/smil+xml"
#define EPUB_MT_PLS									"application/pls+xml"
#define EPUB_MT_MP3									"audio/mpeg"					// Audio Types
#define EPUB_MT_MP4									"audio/mp4"
#define EPUB_MT_STYLE_SHEETS						"text/css"						// Text Types
#define EPUB_MT_JAVASCRIPT							"text/javascript"

// Define encryption algorithm name spaces.
#define EPUB_EANS_AES128							"http://www.w3.org/2001/04/xmlenc#aes128"
#define EPUB_EANS_AES128_CBC						"http://www.w3.org/2001/04/xmlenc#aes128-cbc"

// Define basic file types(BFT:Basic File Type).
typedef enum
{
	EPUB_BFT_MIME_TYPE				= 0,
	EPUB_BFT_META_INF_CONTAINER		= 1,
	EPUB_BFT_META_INF_ENCRYPTION	= 2,
	EPUB_BFT_META_INF_MANIFEST		= 3,
	EPUB_BFT_META_INF_METADATA		= 4,
	EPUB_BFT_META_INF_RIGHTS		= 5,
	EPUB_BFT_META_INF_SIGNATURES	= 6,
	EPUB_BFT_ROOT					= 7,
}EPUB_BasicFileType;

// Define media file types(MFG:Media File Type).
typedef enum
{
	EPUB_MFT_UNKNOWN				= 0,

	// Image Types
	EPUB_MFT_GIF					= 1,
	EPUB_MFT_JPEG					= 2,
	EPUB_MFT_PNG					= 3,
	EPUB_MFT_SVG					= 4,

	// Application Types
	EPUB_MFT_XHTML					= 5,
	EPUB_MFT_OPF2					= 6,
	EPUB_MFT_OPEN_TYPE				= 7,
	EPUB_MFT_WOFF					= 8,
	EPUB_MFT_MEDIA_OVERLAYS			= 9,
	EPUB_MFT_PLS					= 10,

	// Audio Types
	EPUB_MFT_MP3					= 11,
	EPUB_MFT_MP4					= 12,

	// Text Types
	EPUB_MFT_STYLE_SHEETS			= 13,
	EPUB_MFT_JAVASCRIPT				= 14,
} EPUB_MediaFileType;

// Define epub file types(FT:File Type).
typedef enum
{
	EPUB_FT_UNKNOWN					= 0,
	EPUB_FT_MIME_TYPE				= 1,
	EPUB_FT_META_INF_CONTAINER		= 2,
	EPUB_FT_META_INF_ENCRYPTION		= 3,
	EPUB_FT_META_INF_MANIFEST		= 4,
	EPUB_FT_META_INF_METADATA		= 5,
	EPUB_FT_META_INF_RIGHTS			= 6,
	EPUB_FT_META_INF_SIGNATURES		= 7,
	EPUB_FT_ROOT					= 8,
} EPUB_FileType;

// Define EPUB encryption methods.
typedef enum
{
	EPUB_EM_UNKNOWN					= 0,
	EPUB_EM_AES128					= 1,
	EPUB_EM_AES128_CBC				= 2,
} EPUB_EncryptionMethod;

// Define key info type in encryption.xml.
typedef enum
{
	EPUB_KIT_UNKNOWN		= 0,
	EPUB_KIT_UNENCRYPTED	= 1,
	EPUB_KIT_ENCRYPTED		= 2,
} EPUB_KeyInfoType;

// Define cipher data type in encryption.xml.
typedef enum
{
	EPUB_CDT_UNKNOWN		= 0,
	EPUB_CDT_VALUE			= 1,
	EPUB_CDT_REFERENCE		= 2,
} EPUB_CipherDataType;

#endif // _EPUB_DEFINITIONS_H_